1. Field of the Invention
The present invention relates to methods and apparatus for numerically controlling industrial machines such as robots and machine tools.
2. Discussion of Related Art
In a conventional industrial machine such as an articulated robot (hereinafter referred to as "robot") having plural movable portions which correspond to plural control axes and which are simultaneously moved to obtain a desired operation, a hand or the like thereof is moved to pass through predetermined plural teaching points. In such a control system, each movable portion is controlled in accordance with a trapezoidal velocity pattern, as shown in FIG. 1(a) during the time when the hand or the like is moved between two adjacent teaching points. Namely, a maximum velocity Vm and a maximum acceleration em are set for each control axis taking account of the characteristics of a servomotor used for driving a movable portion corresponding to the control axis. When the movable portion is moved from a teaching point P0 to a teaching point P1, it is accelerated at the maximum acceleration am after the departure from the teaching point P0, as shown in FIG. 1(a). When the velocity reaches the maximum velocity Vm after a lapse of .tau. seconds, the movable portion is constantly moved at the velocity Vm. When T seconds which is a period of time defining the timing of starting deceleration (the timing will hereinafter be referred to as "deceleration start time") has elapsed, the movable portion is decelerated at a deceleration corresponding to the maximum acceleration am so that the movable portion reaches the teaching point P1. In the case where a deceleration start time T comes before the velocity reaches the maximum velocity Vm even if the acceleration is made at the maximum acceleration .alpha.m, a triangular velocity pattern shown in FIG. 1(b) is generated to control the velocity of the movable portion.
Although the velocity pattern for each control axis is generated in the above-described manner, the velocity pattern is modified so that the hand or the like of the robot is moved along a moving locus which smoothly connects the plural teaching points. This makes it possible for an operator to easily image the moving locus. To obtain such a smooth locus, all of the movable portions must simultaneously start their movements, and must stop their movements at the same time. Further, it is common that the movable portions are controlled to simultaneously initiate their accelerations and decelerations and to simultaneously end their accelerations and decelerations. Namely, a velocity pattern is individually determined for each of control axes based on the corresponding maximum velocity and maximum acceleration, and is then modified in such a way that all of the movable portions simultaneously start and stop their movements, and that they simultaneously begin and end acceleration and deceleration. This control is referred to as "synchronous control" in this specification. The synchronous control will be described in detail with reference to FIG. 2. For making the description simpler, only the case where the velocities of all the movable portions are controlled in accordance with trapezoidal velocity patterns will be explained. First, velocity patterns are determined for all the control axes, respectively. For i-th axis, a velocity pattern having an acceleration/deceleration time .tau.i, a deceleration start time Ti and a completion time ti is set based on a maximum velocity Vi and a maximum acceleration .alpha.i, as shown in the section (a) of FIG. 2. Similarly, a velocity pattern having an acceleration/deceleration time .tau.j, a deceleration start time Tj, and a completion time tj is set for j-th axis, based on a maximum velocity Vj and a maximum acceleration .alpha.j, as shown in the section (b) of FIG. 2. After velocity patterns have been determined for other control axes in the same way, a control axis whose deceleration start time is the latest is selected. Assuming the case where the deceleration start time Ti of the i-th axis is the latest, the maximum velocities in other control axes are modified based on the deceleration start time Ti. For example, in the j-th axis whose amount of movement is .DELTA.Sj, the maximum velocity is reset to a modified maximum velocity Vj' calculated by the following expression: EQU Vj'=.DELTA.Sj/Ti.
Subsequently, the acceleration/deceleration time is also modified based on the modified maximum velocity Vj'. The modified acceleration/deceleration time .tau.j' is calculated by the following expression: EQU .tau.j'=Vj'/.alpha.j,
wherein .alpha.j is the maximum acceleration of the j-th axis.
After the maximum velocities and acceleration/deceleration times of all the control axes are modified, a control axis whose acceleration/deceleration time is the longest among all the control axes is selected. Assuming the case where the acceleration/deceleration time .tau.j' of the j-th axis is the longest, the accelerations in other axes are modified in such a way that their velocities reach their modified maximum velocities over the acceleration/deceleration time .tau.j'. For example, in the i-th axis, the modified acceleration .alpha.i' is calculated by the following expression: EQU .alpha.i'=Vi'/.tau.j'.
In this case, since the deceleration start time Ti is a reference point in time for the deceleration start times in all the control axes, as mentioned above, Vi' is equal to Vi'.
When the modification of the maximum velocities, accelerations and acceleration/deceleration times in all the control axes have been completed, all of the movable portions corresponding to the control axes are controlled to start deceleration at the deceleration start time Ti, and to accelerate and decelerate over the accelerate/deceleration time .tau.j', as illustrated by broken lines in FIG. 2.
When all the movable portions are controlled in the above-mentioned manner, the movable portions complete their movements at the same point in time (Ti+.tau.j'). Accordingly, the points ti' and tj' in time at which movements in the i-th and j-th axes have completed are expressed as follows: EQU ti'=tj'=Ti+.tau.j'.
The above-described control method is effective for cases where the hand or the like of the robot is required to accurately trace a predetermined moving locus. However, in cases where the accuracy of the moving locus is not demanded, but the hand or the like must be moved through the teaching points at a high speed, the above-described control method brings about drawbacks that the capacities of servomotors for all the control axes cannot be fully utilized, and that time losses are produced.
For example, in the i-axis shown in the section (a) of FIG. 2, the acceleration is modified form .alpha.i to .alpha.i' which is smaller than .alpha.i. Therefore, the time required to complete the movement in the case where the i-th axis is moved in accordance with the velocity pattern which is modified for synchronous control and which is illustrated by the broken line becomes longer, by the time .DELTA.ti (=ti'-ti), than the time required to complete the movement in the case where the i-th axis is independently moved in accordance with the velocity pattern illustrated by the solid line. Further, in the J-axis shown in the section (b) of FIG. 2, the acceleration is modified form .alpha.j to .alpha.j' which is smaller than .alpha.j. Therefore, the time required to complete the movement in the case where the j-th axis is moved in accordance with the velocity pattern which is modified for synchronous control and which is illustrated by the broken line becomes longer, by the time .DELTA.tj (=tj'-tj), than the time required to complete the movement in the case where the j-th axis is independently moved in accordance with the velocity pattern illustrated by the solid line.